<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        a:link {
            color: black;
        }
        a:visited{
            color: blue;
        }
        a:hover {
            color: red;
        }
        a:active {
            color: green;
        }

        .focus:focus {
            outline: 1px solid blue;
        }
    </style>
</head>
<body>

<!--
   10.CSS伪类选择器 伪类:专门用来表示元素的一种特殊状态。常用伪类选择器:
      1)a标签的伪类:
          :link/:visited/:hover/:active
      2):focus 获得焦点
      3):first-child/:last-child/:nth-child(number)
-->
<a href="#">伪类选择器</a>

<input class="focus" type="text" name="username" />

</body>
</html>